package tool

import (
	"github.com/gin-gonic/gin"
)

type ResponseData struct {
	Code    int         `json:"code"`
	Status  string      `json:"status"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

func ServerJSON(con *gin.Context, code int, resp ResponseData) {
	con.JSON(code, resp)
}

func ServerXML(con *gin.Context, code int, resp ResponseData) {
	con.XML(code, resp)
}
